function [b2, newBackupPath] = updateBackupPath(primaryPathTable, backupPathTable,disp_loc, matrix)

     %In order to draw the back up path between the source and the destination if the backup path overwrite on the main path  
      p = length(primaryPathTable);
      b = length(backupPathTable);
      p1 = primaryPathTable(1);
      b1 = backupPathTable(1);
      %newBackupPathTable = zeros(1,1);  
      for u = 2:p      
          p2 = primaryPathTable(u);
         for v = 2:b
             b2 = backupPathTable(v);
             if p1 == b1 && p2 == b2
                 [pathBetweenTwoNodes] = anotherBackupPath(backupPathTable, disp_loc, matrix, b1, b2);
                 [newBackupPath] = insertBackupPathNodes(backupPathTable, pathBetweenTwoNodes,b1,b2);
             else                
                b1 = b2;
             end
         end         
             p1 = p2;
             b1 = backupPathTable(1);
      end
end